package com.longlong.cli;

import picocli.CommandLine;

@CommandLine.Command(name = "add", description = "加法运算", mixinStandardHelpOptions = true)
public class AddCommand implements Runnable {

    @CommandLine.Parameters(index = "0", description = "加数")
    private double a;

    @CommandLine.Parameters(index = "1", description = "被加数")
    private double b;

    @Override
    public void run() {
        System.out.println("a = " + a + ", b = " + b);
        System.out.println("a + b = " + (a + b));
    }
}
